package page.Beans;

import java.sql.SQLException;

import basicTypes.RAReport;

public class reportarRecBean {
	private int RecId;
	private String text;
	
	public int getRecId() {
		return RecId;
	}
	public void setRecId(int recId) {
		RecId = recId;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	
	public String repRec(loginBean x){
		RAReport novo = new RAReport(x.getUser().getId(), RecId, text);
		try{
			x.getBd().db_addReport(x.getUser(), novo);
		}
		catch(SQLException e){
			return "fail";
		}
		
		return "suc";
	}
	
}
